
let fs = require("fs")

let hero =  {
    "id": 53,
    "name": "npc_dota_hero_furion",
    "name_loc": "先知",
    "order_id": 32,
    "name_english_loc": "Nature's Prophet",
    "primary_attr": 2,
    "complexity": 2,
    "bio_loc": "在种子里埋入盘起的灵魂，从岩石深处引出缠绕的水流，起誓阳光会普照这生长的一切，当树木之神维萝迪希娅完成这一系列森林的创造后，她意识到自己的生命也到达终点，如一片命运已被她印在种子中的树叶一样飘落，无法看见自己的梦想结果。嫩芽尚未破土，即使破土，脆弱的嫩芽也很容易受到各种伤害，而她却即将辞世，无能为力，这让她无比痛心。然而她在种子袋中发现了一颗播种时漏掉的种子，在弥留之际，她将力量化作一字箴言，寄于此种，然后将其服下。在漫长的冬天，她巨大的身体逐渐分解，化为了幼苗来年春天的肥料。在春分的早晨，当其它种子还没有苏醒时，最后那颗种子在一瞬间成熟然后爆裂了。从中走出了自然的先知，他身披树叶，强壮且智慧，拥有树木之神维萝迪希娅的力量，能预见到森林最需要他的地方，同时他也很清楚，能作为他的盟友，是天赐的幸运。",
    "hype_loc": "无论是赶赴战场援助友军，还是累积资源准备下次突袭，先知仿佛无处不在。他可以随意<b>传送</b>到任何地方，立刻创造<b>一群狂暴的树木</b>为他作战，他出手的角度总是出乎敌人意料。",
    "npe_desc_loc": "可以随意传送到地图任意位置",
    "str_base": 21,
    "str_gain": 2.6,
    "agi_base": 22,
    "agi_gain": 3.6,
    "int_base": 23,
    "int_gain": 3.7,
    "attack_capability": 2,
    "role_levels": [1, 0, 1, 0, 3, 0, 1, 3, 0],
    "damage_min": 50,
    "damage_max": 60,
    "attack_rate": 1.5,
    "attack_range": 600,
    "projectile_speed": 1125,
    "armor": 3.6666667,
    "magic_resistance": 25,
    "movement_speed": 295,
    "turn_rate": 0.9,
    "sight_range_day": 1800,
    "sight_range_night": 800,
    "max_health": 620,
    "health_regen": 2.3500001,
    "max_mana": 351,
    "mana_regen": 1.9,
    "abilities": [{
        "id": 5245,
        "name": "furion_sprout",
        "name_loc": "发芽",
        "desc_loc": "使一圈树木在一个单位的周围发芽，将其困在其中，提供%vision_range%范围内的视野。",
        "lore_loc": "疯长的绿苗是那些攻击先知的人报告的常见病症。",
        "notes_loc": ["发芽的施放目标可以是任何单位或者地面。", "发芽产生的树木跟英雄技能的相互作用与平常树木相同。"],
        "shard_loc": "发芽的前两棵树木被摧毁时会召唤大树人。同一时间只能拥有2个大树人。",
        "scepter_loc": "",
        "type": 0,
        "behavior": "24",
        "target_team": 3,
        "target_type": 19,
        "flags": 512,
        "damage": 0,
        "immunity": 0,
        "dispellable": 0,
        "max_level": 4,
        "cast_ranges": [625, 700, 775, 850],
        "cast_points": [0.35],
        "channel_times": [0],
        "cooldowns": [11, 10, 9, 8],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [70, 90, 110, 130],
        "gold_costs": [],
        "special_values": [{
            "name": "vision_range",
            "values_float": [250],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "duration",
            "values_float": [3, 4, 5, 6],
            "is_percentage": false,
            "heading_loc": "持续时间：",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [625, 700, 775, 850],
            "is_percentage": false,
            "heading_loc": "施法距离：",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0.35],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [70, 90, 110, 130],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [11, 10, 9, 8],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0,
        "img": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_sprout.png",
        "video_jpg": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_sprout.jpg",
        "video_mp4": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_sprout.mp4",
        "video_webm": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_sprout.webm"
    }, {
        "id": 5246,
        "name": "furion_teleportation",
        "name_loc": "传送",
        "desc_loc": "传送到地图上任何位置。",
        "lore_loc": "先知保护着整片森林，当森林需要他的时候立刻出现。",
        "notes_loc": ["魔耗和冷却时间都是在技能施放结束后结算。先知在施放技能时被打断将不会耗费魔法或使技能进入冷却。", "施法开始后，目标地点将产生视觉特效，对队友和敌人均可见。"],
        "shard_loc": "",
        "scepter_loc": "",
        "type": 0,
        "behavior": "67633168",
        "target_team": 0,
        "target_type": 0,
        "flags": 0,
        "damage": 0,
        "immunity": 0,
        "dispellable": 3,
        "max_level": 4,
        "cast_ranges": [0],
        "cast_points": [3, 3, 3, 3],
        "channel_times": [0],
        "cooldowns": [65, 50, 35, 20],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [50, 50, 50, 50],
        "gold_costs": [],
        "special_values": [{
            "name": "AbilityCastRange",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [3],
            "is_percentage": false,
            "heading_loc": "施法时间：",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [50],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [65, 50, 35, 20],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0,
        "img": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_teleportation.png",
        "video_jpg": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_teleportation.jpg",
        "video_mp4": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_teleportation.mp4",
        "video_webm": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_teleportation.webm"
    }, {
        "id": 5247,
        "name": "furion_force_of_nature",
        "name_loc": "自然的呼唤",
        "desc_loc": "将一片树木转化成由先知操控的树人。",
        "lore_loc": "维萝迪希娅赐予先知召唤树人守卫的能力，这是大自然的神话军队。",
        "notes_loc": ["自然的呼唤产生的树人不会超过目标区域内树木的数量。"],
        "shard_loc": "",
        "scepter_loc": "",
        "type": 0,
        "behavior": "48",
        "target_team": 0,
        "target_type": 0,
        "flags": 0,
        "damage": 0,
        "immunity": 0,
        "dispellable": 0,
        "max_level": 4,
        "cast_ranges": [750],
        "cast_points": [0.5, 0.5, 0.5, 0.5],
        "channel_times": [0],
        "cooldowns": [37],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [150],
        "gold_costs": [],
        "special_values": [{
            "name": "area_of_effect",
            "values_float": [150, 225, 300, 375],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "max_treants",
            "values_float": [2, 3, 4, 5],
            "is_percentage": false,
            "heading_loc": "树人数量：",
            "bonuses": []
        }, {
            "name": "duration",
            "values_float": [60],
            "is_percentage": false,
            "heading_loc": "树人持续时间：",
            "bonuses": []
        }, {
            "name": "treant_health_tooltip",
            "values_float": [550],
            "is_percentage": false,
            "heading_loc": "树人生命值：",
            "bonuses": []
        }, {
            "name": "treant_dmg_tooltip",
            "values_float": [18, 26, 34, 42],
            "is_percentage": false,
            "heading_loc": "树人攻击力：",
            "bonuses": []
        }, {
            "name": "treant_hp_bonus",
            "values_float": [825],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "treant_damage_bonus",
            "values_float": [27, 39, 51, 63],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "treant_large_hp_bonus",
            "values_float": [1320],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "treant_large_damage_bonus",
            "values_float": [57, 67, 77, 87],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [750],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0.5],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [150],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [37],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0,
        "img": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_force_of_nature.png",
        "video_jpg": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_force_of_nature.jpg",
        "video_mp4": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_force_of_nature.mp4",
        "video_webm": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_force_of_nature.webm"
    }, {
        "id": 997,
        "name": "furion_curse_of_the_forest",
        "name_loc": "青森诅咒",
        "desc_loc": "对%range%范围内所有敌方英雄施加一个诅咒，使他们在迷雾中显形，根据%radius%范围内树木的数量对他们造成减速和持续伤害。在此情况下树人也被视为树木。",
        "lore_loc": "自然的先知虽然天赋异禀，但是并非无所不见，他必须严重依赖忠实的朋友组成的天网为他提供侦查和援助。",
        "notes_loc": [],
        "shard_loc": "",
        "scepter_loc": "",
        "type": 0,
        "behavior": "8589934597",
        "target_team": 2,
        "target_type": 1,
        "flags": 0,
        "damage": 2,
        "immunity": 4,
        "dispellable": 2,
        "max_level": 1,
        "cast_ranges": [0],
        "cast_points": [0.2],
        "channel_times": [0],
        "cooldowns": [18],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [80],
        "gold_costs": [],
        "special_values": [{
            "name": "duration",
            "values_float": [6],
            "is_percentage": false,
            "heading_loc": "持续时间：",
            "bonuses": []
        }, {
            "name": "damage_per_tree",
            "values_float": [15],
            "is_percentage": false,
            "heading_loc": "每棵树木每秒伤害：",
            "bonuses": []
        }, {
            "name": "slow_per_tree",
            "values_float": [7],
            "is_percentage": true,
            "heading_loc": "每棵树木移速减缓：",
            "bonuses": []
        }, {
            "name": "radius",
            "values_float": [250],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "range",
            "values_float": [1200],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0.2],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [80],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [18],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": true,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0,
        "img": "https://cdn.cloudflare.steamstatic.com/apps/dota2/images/dota_react/abilities/furion_curse_of_the_forest.png",
        "video_jpg": "https://cdn.cloudflare.steamstatic.com/apps/dota2/videos/dota_react/abilities/furion/furion_aghanims_shard.jpg",
        "video_mp4": "https://cdn.cloudflare.steamstatic.com/apps/dota2/videos/dota_react/abilities/furion/furion_aghanims_shard.mp4",
        "video_webm": "https://cdn.cloudflare.steamstatic.com/apps/dota2/videos/dota_react/abilities/furion/furion_aghanims_shard.webm",
        "video_shard_jpg": "https://cdn.cloudflare.steamstatic.com/apps/dota2/videos/dota_react/abilities/furion/furion_aghanims_shard.jpg",
        "video_shard_mp4": "https://cdn.cloudflare.steamstatic.com/apps/dota2/videos/dota_react/abilities/furion/furion_aghanims_shard.mp4",
        "video_shard_webm": "https://cdn.cloudflare.steamstatic.com/apps/dota2/videos/dota_react/abilities/furion/furion_aghanims_shard.webm"
    }, {
        "id": 5248,
        "name": "furion_wrath_of_nature",
        "name_loc": "自然之怒",
        "desc_loc": "伤害性的能量在全地图跳跃，打击视野中距目标点最近的多个敌人。每击中一个敌人伤害都会增加。该技能每杀死一个敌人都会使自身获得额外攻击力，持续%kill_damage_duration%秒。",
        "lore_loc": "先知召唤维萝迪希娅的狂怒，消灭那些想要毁坏自然的敌人。",
        "notes_loc": ["自然的愤怒只能伤害视野内的单位。", "可以通过点击小地图施放；初始目标将选择施放地点最近的有效单位。"],
        "shard_loc": "",
        "scepter_loc": "冷却时间降低至%scepter_cooldown%秒。缠绕所有击中的敌人。持续时间根据弹跳次序从%scepter_min_entangle_duration%秒开始增加，弹跳数达到上限时为%scepter_max_entangle_duration%秒。",
        "type": 1,
        "behavior": "24",
        "target_team": 2,
        "target_type": 3,
        "flags": 0,
        "damage": 2,
        "immunity": 4,
        "dispellable": 2,
        "max_level": 3,
        "cast_ranges": [0],
        "cast_points": [0.5, 0.5, 0.5],
        "channel_times": [0],
        "cooldowns": [85],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [130, 160, 190],
        "gold_costs": [],
        "special_values": [{
            "name": "max_targets",
            "values_float": [18],
            "is_percentage": false,
            "heading_loc": "最大目标数：",
            "bonuses": []
        }, {
            "name": "damage",
            "values_float": [115, 150, 185],
            "is_percentage": false,
            "heading_loc": "伤害：",
            "bonuses": []
        }, {
            "name": "damage_percent_add",
            "values_float": [10],
            "is_percentage": true,
            "heading_loc": "每次弹跳增加伤害：",
            "bonuses": []
        }, {
            "name": "jump_delay",
            "values_float": [0.25],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "kill_damage",
            "values_float": [6],
            "is_percentage": false,
            "heading_loc": "每个单位提供额外攻击力：",
            "bonuses": []
        }, {
            "name": "kill_damage_duration",
            "values_float": [50],
            "is_percentage": false,
            "heading_loc": "额外攻击力持续时间：",
            "bonuses": []
        }, {
            "name": "scepter_cooldown",
            "values_float": [60],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "scepter_min_entangle_duration",
            "values_float": [2],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "scepter_max_entangle_duration",
            "values_float": [3.8],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0.5],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [130, 160, 190],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [85],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": true,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0,
        "img": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_wrath_of_nature.png",
        "video_jpg": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_wrath_of_nature.jpg",
        "video_mp4": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_wrath_of_nature.mp4",
        "video_webm": "https://img.dota2.com.cn/dota2static/herostatic/npc_dota_hero_furion/furion_wrath_of_nature.webm",
        "video_scepter_jpg": "https://img.dota2.com.cn/dota2static/herostatic/upgrade/npc_dota_hero_furion/furion_aghanims_scepter.jpg",
        "video_scepter_mp4": "https://img.dota2.com.cn/dota2static/herostatic/upgrade/npc_dota_hero_furion/furion_aghanims_scepter.mp4",
        "video_scepter_webm": "https://img.dota2.com.cn/dota2static/herostatic/upgrade/npc_dota_hero_furion/furion_aghanims_scepter.webm"
    }],
    "talents": [{
        "id": 926,
        "name": "special_bonus_unique_furion_6",
        "name_loc": "-{s:value}秒 自然的呼唤冷却",
        "desc_loc": "",
        "lore_loc": "",
        "notes_loc": [],
        "shard_loc": "",
        "scepter_loc": "",
        "type": 2,
        "behavior": "2",
        "target_team": 0,
        "target_type": 0,
        "flags": 0,
        "damage": 0,
        "immunity": 0,
        "dispellable": 0,
        "max_level": 4,
        "cast_ranges": [0],
        "cast_points": [0],
        "channel_times": [0],
        "cooldowns": [0],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [0],
        "gold_costs": [],
        "special_values": [{
            "name": "value",
            "values_float": [8],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0
    }, {
        "id": 470,
        "name": "special_bonus_unique_furion_5",
        "name_loc": "+{s:value} 自然之怒基础伤害",
        "desc_loc": "",
        "lore_loc": "",
        "notes_loc": [],
        "shard_loc": "",
        "scepter_loc": "",
        "type": 2,
        "behavior": "2",
        "target_team": 0,
        "target_type": 0,
        "flags": 0,
        "damage": 0,
        "immunity": 0,
        "dispellable": 0,
        "max_level": 4,
        "cast_ranges": [0],
        "cast_points": [0],
        "channel_times": [0],
        "cooldowns": [0],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [0],
        "gold_costs": [],
        "special_values": [{
            "name": "value",
            "values_float": [30],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0
    }, {
        "id": 6016,
        "name": "special_bonus_attack_speed_25",
        "name_loc": "+{s:value} 攻击速度",
        "desc_loc": "",
        "lore_loc": "",
        "notes_loc": [],
        "shard_loc": "",
        "scepter_loc": "",
        "type": 2,
        "behavior": "2",
        "target_team": 0,
        "target_type": 0,
        "flags": 0,
        "damage": 0,
        "immunity": 0,
        "dispellable": 0,
        "max_level": 4,
        "cast_ranges": [0],
        "cast_points": [0],
        "channel_times": [0],
        "cooldowns": [0],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [0],
        "gold_costs": [],
        "special_values": [{
            "name": "value",
            "values_float": [25],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0
    }, {
        "id": 6500,
        "name": "special_bonus_unique_furion_2",
        "name_loc": "+{s:value} 召唤树人",
        "desc_loc": "",
        "lore_loc": "",
        "notes_loc": [],
        "shard_loc": "",
        "scepter_loc": "",
        "type": 2,
        "behavior": "2",
        "target_team": 0,
        "target_type": 0,
        "flags": 0,
        "damage": 0,
        "immunity": 0,
        "dispellable": 0,
        "max_level": 4,
        "cast_ranges": [0],
        "cast_points": [0],
        "channel_times": [0],
        "cooldowns": [0],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [0],
        "gold_costs": [],
        "special_values": [{
            "name": "value",
            "values_float": [5],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0
    }, {
        "id": 927,
        "name": "special_bonus_unique_furion_7",
        "name_loc": "发芽具有束缚效果",
        "desc_loc": "",
        "lore_loc": "",
        "notes_loc": [],
        "shard_loc": "",
        "scepter_loc": "",
        "type": 2,
        "behavior": "2",
        "target_team": 0,
        "target_type": 0,
        "flags": 0,
        "damage": 0,
        "immunity": 0,
        "dispellable": 0,
        "max_level": 4,
        "cast_ranges": [0],
        "cast_points": [0],
        "channel_times": [0],
        "cooldowns": [0],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [0],
        "gold_costs": [],
        "special_values": [{
            "name": "value",
            "values_float": [1],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0
    }, {
        "id": 6702,
        "name": "special_bonus_unique_furion_4",
        "name_loc": "{s:value}% 被发芽单位落空几率",
        "desc_loc": "",
        "lore_loc": "",
        "notes_loc": [],
        "shard_loc": "",
        "scepter_loc": "",
        "type": 2,
        "behavior": "2",
        "target_team": 0,
        "target_type": 0,
        "flags": 0,
        "damage": 0,
        "immunity": 0,
        "dispellable": 0,
        "max_level": 4,
        "cast_ranges": [0],
        "cast_points": [0],
        "channel_times": [0],
        "cooldowns": [0],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [0],
        "gold_costs": [],
        "special_values": [{
            "name": "value",
            "values_float": [100],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0
    }, {
        "id": 6539,
        "name": "special_bonus_unique_furion_3",
        "name_loc": "传送无冷却",
        "desc_loc": "",
        "lore_loc": "",
        "notes_loc": [],
        "shard_loc": "",
        "scepter_loc": "",
        "type": 2,
        "behavior": "2",
        "target_team": 0,
        "target_type": 0,
        "flags": 0,
        "damage": 0,
        "immunity": 0,
        "dispellable": 0,
        "max_level": 4,
        "cast_ranges": [0],
        "cast_points": [0],
        "channel_times": [0],
        "cooldowns": [0],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [0],
        "gold_costs": [],
        "special_values": [{
            "name": "value",
            "values_float": [1],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0
    }, {
        "id": 6084,
        "name": "special_bonus_unique_furion",
        "name_loc": "{s:value}倍 树人生命/攻击力",
        "desc_loc": "",
        "lore_loc": "",
        "notes_loc": [],
        "shard_loc": "",
        "scepter_loc": "",
        "type": 2,
        "behavior": "2",
        "target_team": 0,
        "target_type": 0,
        "flags": 0,
        "damage": 0,
        "immunity": 0,
        "dispellable": 0,
        "max_level": 4,
        "cast_ranges": [0],
        "cast_points": [0],
        "channel_times": [0],
        "cooldowns": [0],
        "durations": [0],
        "damages": [0, 0, 0, 0],
        "mana_costs": [0],
        "gold_costs": [],
        "special_values": [{
            "name": "value",
            "values_float": [2.5],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastRange",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChannelTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityDuration",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCastPoint",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCharges",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityChargeRestoreTime",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityManaCost",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }, {
            "name": "AbilityCooldown",
            "values_float": [0],
            "is_percentage": false,
            "heading_loc": "",
            "bonuses": []
        }],
        "is_item": false,
        "ability_has_scepter": false,
        "ability_has_shard": false,
        "ability_is_granted_by_scepter": false,
        "ability_is_granted_by_shard": false,
        "item_cost": 0,
        "item_initial_charges": 0,
        "item_neutral_tier": 4294967295,
        "item_stock_max": 0,
        "item_stock_time": 0,
        "item_quality": 0
    }]
}

let shoes = [
    {name:"假腿(力量)",cost:1400,heroStrength: 10,heroAtkSpeed: 20},
    {name:"假腿(智力)",cost:1400,heroAgi: 10,heroAtkSpeed: 20},
    {name:"假腿(敏捷)",cost:1400,heroInt: 10,heroAtkSpeed: 20},
    {name:"相位鞋",cost:1500,heroAttack: 12,heroArmor: 4},
    {name:"宽容之靴",cost:4125,heroStrength: 8,heroInt: 8, heroHpRegen:15},
    {name:"卫士胫甲",cost:5050,heroArmor: 7, heroHpRegen:2.5},
]


let items = [
    {
        name: "攻击之爪",
        cost: 450,
        heroAttack: 9
    },
    {
        name: "守护指环",
        cost: 175,
        heroArmor: 2
    },
    {
        name: "锁子甲",
        cost: 550,
        heroArmor: 4
    },
    {
        name: "短棍",
        cost: 875,
        heroAtkSpeed: 10,
        heroAttack: 10
    },
    {
        name: "加速手套",
        cost: 450,
        heroAtkSpeed: 20,
    },
    {
        name: "振奋宝石",
        cost: 2000,
        heroAtkSpeed: 60,
    },
    {
        name: "活力球",
        cost: 1000,
        heroHp: 100
    },
    {
        name: "空明杖",
        cost: 1500,
        heroAttack: 15,
        heroInt: 10,
        heroAtkSpeed: 10,
        heroMpRegen: 1.25
    },
    {
        name: "护腕",
        cost: 505,
        heroAttack: 15,
        heroStrength: 5,
        heroAgi: 2,
        heroInt: 2,
        heroAttack: 2,
        heroHpRegen: 0.75
    },
    {
        name: "系带",
        cost: 505,
        heroAttack: 15,
        heroAgi: 5,
        heroStrength: 2,
        heroInt: 2,
        heroAtkSpeed: 6,
        heroArmor: 2
    },
    {
        name: "挂件",
        cost: 505,
        heroAttack: 15,
        heroInt: 5,
        heroAgi: 2,
        heroStrength: 2,
        heroAtkSpeed: 6,
        heroMpRate: 3,
        heroMpRegen: 0.75
    },
    {
        name: "猎鹰战刃",
        cost: 1125,
        heroAttack: 14,
        heroHp: 200,
        heroMpRegen: 1.8
    },
    {
        name: "漩涡",
        cost: 2700,
        heroAttack: 24 + 42,
    },
    {
        name: "幻影斧",
        cost: 4600,
        heroStrength: 10,
        heroAgi: 26,
        heroInt: 10,
        heroAtkSpeed: 12,
    },
    {
        name: "水晶剑",
        cost: 1950,
        heroAttack: 32,
        csRate: 1.18
    },
    {
        name: "亡魂胸针",
        cost: 6200,
        heroInt: 45,
        heroAtkSpeed: 40,
        heroArmor: 8
    },
    {
        name: "血棘",
        cost: 6800,
        heroAttack: 50,
        heroInt: 20,
        heroAtkSpeed: 60,
        heroMpRegen: 5,
        heroMagicResistance: 25
    },
]
let daPeis = []
let baseDmg = analysisHero(hero, 24).dazhuang
items.forEach((item, i1) => {
    items.forEach((item2, i2) => {
        if(i2 > i1) {
            shoes.forEach(shoe => {
                daPeis.push({
                    shoe:shoe.name, item1:item.name, item2:item2.name,
                    cost: shoe.cost + item.cost + item2.cost,
                    dazhuang: analysisHero(hero, 24, [shoe, item, item2]).dazhuang
                })
            })
        }
    })
})
daPeis.sort((a,b) => ((b.dazhuang-baseDmg)/b.cost) - ((a.dazhuang-baseDmg)/a.cost))
console.log(daPeis.slice(0,10));
fs.writeFileSync("./cache/itemMoni.json", JSON.stringify(daPeis))
// daPeis

function analysisHero(heroData, lv=1, items) {
    let {primary_attr,str_base,str_gain,agi_base,agi_gain,int_base,int_gain,
        max_health,health_regen,max_mana,mana_regen,
        armor,magic_resistance,movement_speed,name_loc,name_english_loc,
        damage_min,damage_max,attack_rate,attack_range,attack_capability
    } = heroData;

    let heroStrength =  str_gain * (lv - 1) ; // normal attr
    let heroAgi =  agi_gain * (lv - 1); // normal attr
    let heroInt =  int_gain * (lv - 1); // normal attr
    let heroHp = max_health
    let heroHpRegen = health_regen
    let heroMp = max_mana
    let heroMpRegen = mana_regen
    let heroArmor = armor
    let heroMagicResistance = magic_resistance
    let heroMoveSpeed = movement_speed
    let heroAttack = (damage_min + damage_max) / 2
    let heroAtkSpeed = attack_capability;
    let heroAtkLong = attack_range
    let heroAtkUseTime = attack_rate
    let heroType = primary_attr // [0,1,2] Strength heroAgi heroInt
    let csRate = 1
    if(items) {
        items.forEach(item => {
            heroStrength += item.heroStrength||0
            heroAgi += item.heroAgi||0
            heroInt += item.heroInt||0
            heroHp += item.heroHp||0
            heroHpRegen += item.heroHpRegen||0
            heroMp += item.heroMp||0
            heroMpRegen += item.heroMpRegen||0
            heroArmor += item.heroArmor||0
            heroMagicResistance += item.heroMagicResistance||0
            heroMoveSpeed += item.heroMoveSpeed||0
            heroAttack += item.heroAttack||0
            heroAtkSpeed += (item.heroAtkSpeed||0) / 100
            heroAtkLong += item.heroAtkLong||0
            csRate *= (item.csRate||1)
        })
    }
    
    // items jiacheng

    let mianban = {
        name: name_loc,csRate,
        strength: heroStrength + str_base,
        agi: heroAgi + agi_base,
        int: heroInt + int_base,
        attrPoint: heroStrength + str_base +heroAgi + agi_base +heroInt + int_base,
        hp: heroHp + heroStrength*17.8,
        hpRegen: heroHpRegen+heroStrength*0.1,
        mp: heroMp + heroInt * 11.2,
        mpRegen: heroMpRegen + heroInt * 0.05,
        armor: heroArmor + heroAgi/6,
        magicRes: heroMagicResistance,
        moveSpeed: heroMoveSpeed,
        attack: heroAttack + (heroType == 0? heroStrength : (heroType == 1 ?heroAgi :heroInt)),
        atkUseTime: heroAtkUseTime,
        atkSpeed: heroAtkSpeed + (heroAgi/100)*1, 
        atkLong: heroAtkLong,
    }
    // 计算攻速 每秒打多少下
    mianban.dpKit = 1 / ((1/mianban.atkSpeed) * mianban.atkUseTime)
    mianban.dps = mianban.dpKit * mianban.attack
    mianban.wuliHp = mianban.hp * defTurnHp(mianban.armor)
    mianban.dazhuang = atkBazi(mianban)

    
    // 62 3 310   31 24 21
    // 800 327   15.7  1.1
    return mianban
}





function atkBazi(p1) { // 
    let fightSecond = 0
    let p1Hp = p1.hp
    let baziHp = 0
    let baziArmor = 20
    let baziAtk = 300
    while (fightSecond < 1000) {
        fightSecond++;
        // base 互 a
        p1Hp -= baziAtk * defReduce(p1.armor)
        baziHp += p1.dps * (p1.csRate||1) * defReduce(baziArmor)
        // dead 判定
        if(p1Hp <= 0) {
            break
        }
        // 回复
        p1Hp += p1.hpRegen
    }
    return baziHp
}


function defTurnHp(armor) {
    return 1+(armor * 0.06 / ( 1 + Math.abs(armor) * 0.06))
}


function defReduce(armor) {
    return 1-(armor * 0.06 / ( 1 + Math.abs(armor) * 0.06))
}

